﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListGalerii.aspx.cs" MasterPageFile="~/index.Master" Inherits="Fotobanka.SpravaGalerii" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Obsah" runat="server">
    <asp:HyperLink ID="AddLink" runat="server" NavigateUrl="PridatGalerii.aspx">Přidat galerii</asp:HyperLink><br />
    <br />
    <asp:Label ID="Label1" runat="server" Text="Mnou spravované galerie:"></asp:Label><br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1" AllowPaging="True" BackColor="White" 
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        GridLines="Vertical" DataKeyNames="Id" 
        onrowdatabound="GridView1_RowDataBound" >
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <Columns>
            <asp:BoundField DataField="GalleryAdmin" HeaderText="Spravce" 
                SortExpression="Spravce">
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:BoundField>
            <asp:BoundField DataField="Name" HeaderText="Jméno" SortExpression="Name">
            <HeaderStyle Width="100px" />
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:BoundField>
            <asp:BoundField DataField="Description" HeaderText="Popis" 
                SortExpression="Description">
            <HeaderStyle Width="350px" />
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:BoundField>
            <asp:BoundField DataField="CreatedOn" HeaderText="Vytvořena" 
                SortExpression="CreatedOn">
            <HeaderStyle Width="200px" />
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:BoundField>
            <asp:BoundField DataField="Hidden" HeaderText="Skrytá" SortExpression="Hidden">
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="EditovatGalerii.aspx?id={0}" HeaderText="E" 
                NavigateUrl="EditovatGalerii.aspx" Text="E" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="SpravaSkupin.aspx?id={0}" HeaderText="G" 
                NavigateUrl="SpravaSkupin.aspx" Text="G" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="SpravaFotek.aspx?id={0}" HeaderText="F" 
                NavigateUrl="SpravaFotek.aspx" Text="F" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="SpravaUzivateluVgalerii.aspx?id={0}" HeaderText="U" 
                NavigateUrl="SpravaUzivateluVgalerii.aspx" Text="U" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#DCDCDC" />
    </asp:GridView>
    <br />
    <asp:Label ID="Label2" runat="server" Text="Galerie, ke kterým mám přístup"></asp:Label>
    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataSourceID="ObjectDataSource2" ForeColor="#333333" 
        GridLines="None">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Jméno" SortExpression="Name" />
            <asp:BoundField DataField="Description" HeaderText="Popis" 
                SortExpression="Description" />
            <asp:BoundField DataField="CreatedOn" HeaderText="CreatedOn" 
                SortExpression="CreatedOn" />
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <br />
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        TypeName="Fotobanka.GalleriesManager" DeleteMethod="DeleteFromDB">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="id" 
                PropertyName="SelectedValue" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        TypeName="Fotobanka.GalleriesManager">
    </asp:ObjectDataSource>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Ovladaci_panel" runat="server">
</asp:Content>

